package com.jayson.geng.pms.controller;

import com.jayson.geng.pms.service.MainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class MainController {


    @Autowired
    MainService mainService;

    @RequestMapping("/")
    public String index(){
        return "index";
    }

    @ResponseBody
    @RequestMapping("/submit")
    public String submit(@RequestParam("data")String data){
        return mainService.submit(data);
    }
}
